﻿if exists (select * from dbo.sysobjects where name = 'sp_tb_User_Service_Update')
	drop procedure [dbo].[sp_tb_User_Service_Update]
Go 
CREATE PROCEDURE dbo.sp_tb_User_Service_Update
@Username	varchar(50),
@ServiceId	int,
@ServiceId	int,
@Username	varchar(50),
@Password	varchar(50),
@Address	varchar(50),
@Phone	varchar(12),
@Gender	bit,
@Status	bit,
@Id	int,
@Name	varchar(50),
@Status	bit,
@Username	varchar(50),
@ServiceId	int,
@Id	int,
@UserId	varchar(50),
@DateTime	smalldatetime(),
@Amount	money,
@Phone	varchar(12),
@Status	bit,
@Id	int,
@Email	varchar(50),
@Title	varchar(500),
@Content	text(2147483647),
@Status	bit,
@reply	varchar(-1),
@Username	varchar(50),
@Password	varchar(50),
@Status	bit
AS
UPDATE tb_User_Service SET [Username] = @Username,[Password] = @Password,[Address] = @Address,[Phone] = @Phone,[Gender] = @Gender,[Status] = @Status,[Id] = @Id,[Name] = @Name,[Status] = @Status,[Username] = @Username,[ServiceId] = @ServiceId,[Id] = @Id,[UserId] = @UserId,[DateTime] = @DateTime,[Amount] = @Amount,[Phone] = @Phone,[Status] = @Status,[Id] = @Id,[Email] = @Email,[Title] = @Title,[Content] = @Content,[Status] = @Status,[reply] = @reply,[Username] = @Username,[Password] = @Password,[Status] = @Status
WHERE  Username= @Username AND ServiceId= @ServiceId AND ServiceId= @ServiceId
Go